import time
import redis

r = redis.StrictRedis("127.0.0.1", 6379, 0)
start = 0
while True:
    end = int(r.get("order_sum"))
    speed = (end - start)+30
    r.set("speed",speed)
    start = end
    print(speed)
    time.sleep(1)
